//
//  GraphicsVC.m
//  test02
//
//  Created by lzh on 2020/10/17.
//  Copyright © 2020 NO. All rights reserved.
//

#import "GraphicsVC.h"
#import "GraphicsView.h"
#import "MyLayerDelegate.h"

@interface GraphicsVC()

@property (nonatomic, strong) id myLayerDelegate;

@end
@implementation GraphicsVC

-(void)viewDidLoad{
    
    self.view.backgroundColor= [UIColor whiteColor];
    
    
    GraphicsView * graphics_view = [[GraphicsView alloc]initWithFrame:CGRectMake(50, 200, 200, 200)];
    
    [self.view addSubview:graphics_view];
    
    
    UILabel * lable = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200, 20)];
    
    lable.text = @"1234567";
    [graphics_view addSubview:lable];
    
    
//    _myLayerDelegate = [[MyLayerDelegate alloc]init];
//    
//    UIView * view2 = [[UIView alloc]initWithFrame:self.view.bounds];
//    view2.layer.delegate = _myLayerDelegate;
//    [view2.layer setNeedsDisplay];
//    [self.view addSubview:view2];
    
//    CALayer *layer = [CALayer layer];
//    layer.backgroundColor = [UIColor magentaColor].CGColor;
//    layer.bounds = CGRectMake(0, 0, 300, 500);
//    layer.anchorPoint = CGPointZero;
//    layer.delegate = _myLayerDelegate;
//    [layer setNeedsDisplay];
//    [view2.layer addSublayer:layer];
}

@end
